An Abstract Interpretation for ML Equality Kinds
نویسندگان
چکیده
The definition of Standard ML provides a form of generic equality which is inferred for certain types, called equality types, on which it is possible to define an equality relation in ML. However, the standard definition is incomplete in the sense that there are interesting and useful types which are not inferred to be equality types but for which an equality relation can be defined in ML in a uniform manner. In this paper, a refinement of the Standard ML system of equality types is introduced and is proven sound and complete with respect to the existence of a definable equality. The technique used here is based on an abstract interpretation of ML operators as monotone functions over a three point lattice. It is shown how the equality relation can be defined (as an ML program) from the definition of a type with our equality property. Finally, a sound, efficient algorithm for inferring the equality property which corrects the limitations of the standard definition in all cases of practical interest is demonstrated. Comments University of Pennsylvania Department of Computer and Information Science Technical Report No. MSCIS-91-23. This technical report is available at ScholarlyCommons: http://repository.upenn.edu/cis_reports/761 An Abstract Interpretation For ML Equality Kinds MS-CIS-91-23 LOGIC & COMPUTATION 30 Carl A. Gunter (University of Pennsylvania) Elsa L. Gunter (AT&T Bell Laboratories) David B. MacQueen (AT&T Bell Labortories) Department of Computer and Information Science School of Engineering and Applied Science University of Pennsylvania Philadelphia, PA 19104-6389
منابع مشابه
Computing ML Equality Kinds Using Abstract Interpretation
The de nition of Standard ML provides a form of generic equality which is inferred for certain types, called equality types, on which it is possible to de ne an equality relation in ML. However, the standard de nition is incomplete in the sense that there are interesting and useful types which are not inferred to be equality types but for which an equality relation can be de ned in ML in a unif...
متن کاملAnalysis of the Equality Relations for the Program Terms
In this article an abstract interpretation and formal language based analysis for imperative programs is presented. This analysis makes a lower approximation of the equality relations for the program terms, i.e. for a given program point our analysis produces a set of equalities t1 = t2 where t1 and t2 represent program expressions such that their values are equal for any behavior of the progra...
متن کاملConjunctive Abstract Interpretation Using Paramodulation
Scaling static analysis is one of the main challenges for program verification in general and for abstract interpretation in particular. One way to compactly represent a set of states is using a formula in conjunctive normal form (CNF). This can sometimes save exponential factors. Therefore, CNF formulae are commonly used in manual program verification and symbolic reasoning. However, it is not...
متن کاملEnvironment Analysis of Higher-Order Languages
Any analysis of higher-order languages must grapple with the tri-facetted nature of λ. In one construct, the fundamental control, environment and data structures of a language meet and intertwine. With the control facet tamed nearly two decades ago, this work brings the environment facet to heel, defining the environment problem and developing its solution: environment analysis. Environment ana...
متن کاملAn Interpretation of Standard ML in Type Theory
We de ne an interpretation of Standard ML into type theory. The interpretation takes the form of a set of elaboration rules reminiscent of the static semantics given in The De nition of Standard ML. In particular, the elaboration rules are given in a relational style, exploiting indeterminacy to avoid over-commitment to speci c implementation techniques. Elaboration consists of identi er scope ...
متن کامل